str="1234afcr67"
cnt=0
for e in str :
    if e.isdigit():
        cnt+=int(e)
print(cnt)